Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Aug 19, 2020

I added two test cases in #8007, which increased coverage. However, upon further review, I noticed the choice of parameters to hit edge conditions didn't cover the string data types.

Rather than adding a bunch more copies of basically the same test to add new parameters for different tests, I instead propose using the same set of parameters for all data types and drive the tests using a table in this PR.

It makes the test logic slightly harder to follow, in my opinion, but it does increase coverage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the basic idea -- drive the test with a table that is shared between bool, utf, and fixed_len_binary_array types

@github-actions
Copy link

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you felt the need to add a comment explaining the values, a tiny suggestion is to declare all members of TestOptions as pub and use

TestOptions {
    num_row_groups: 3,
    num_rows: 25,
    record_batch_size: 5,
    num_iterations: 50,
}

instead, to increase readability of the values' meaning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea -- I will do so before turning this into a full on PR for review

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f149500

@alamb alamb force-pushed the alamb/ARROW-9790-test-consolidation branch 2 times, most recently from 3967510 to f149500 Compare August 21, 2020 15:05
@alamb alamb marked this pull request as ready for review August 21, 2020 15:05
@alamb alamb force-pushed the alamb/ARROW-9790-test-consolidation branch from f149500 to bc384b3 Compare August 30, 2020 10:55
}

#[test]
fn test_bool_single_column_reader_test_batch_size_divides_into_row_group_size() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants